unit uBaseMainMenu;

interface
uses
  GlScene, GlMaterial, GlHudObjects,

  uBasePage,
  uGLBasePage;
type
//------------------------------------------------------------------------------
  TBaseMainMenu = class(TGLBasePage)
  protected
    fHudSprite: TGlHudSprite;
    Procedure InitCustomObjects(fMaterialLibrary: TGlMaterialLibrary); override;
    Procedure UpdateUnitTime(); override;
  public
  end;
implementation
//------------------------------------------------------------------------------
Procedure TBaseMainMenu.UpdateUnitTime();
begin
  inherited UpdateUnitTime;
  fHudSprite.Material.GetActualPrimaryMaterial().FrontProperties.Diffuse.Alpha := fUnitTime;
end;
//------------------------------------------------------------------------------
Procedure TBaseMainMenu.InitCustomObjects(fMaterialLibrary: TGlMaterialLibrary);
begin
  fHudSprite := TGlHudSprite.CreateAsChild(fPageDummy);
  with fHudSprite do
  begin
    Material.LibMaterialName := 'cup';
    Material.MaterialLibrary := fMaterialLibrary;
    Width := Material.GetActualPrimaryTexture.Image.Width;
    Height := Material.GetActualPrimaryTexture.Image.Height;
    Position.SetPoint(100, 200, 0);
  end;
end;
//------------------------------------------------------------------------------
end.
